import {commonConfig} from "../common";
import {tableOptBtnConfig} from "../table";

export default {
  "tableId": "generalCommand",
  "name": "通用命令",
  "columns": [
    {
      label: '设备类别',
      width: 140,
      children: [
        {
          key: 'deviceTypeName',
        },
      ]
    },
    {
      label: '命令编号',
      children: [
        {
          key: 'generalCommandNo',
        },
      ],
    },
    {
      label: '命令方法名',
      width: 180,
      children: [
        {
          key: 'methodName',
          tooltip: true
        }
      ],
    },
    {
      label: '命令方法别名',
      width: 180,
      children: [
        {
          key: 'methodAlias',
          tooltip: true
        },
      ]
    },
    {
      label: '是否通用',
      children: [
        {
          key: 'isGeneralText',
        },
      ],
    },
    {
      label: '响应参数',
      width: 160,
      children: [
        {
          key: 'statusParamsText',
          html: true,
          tooltip: true,
        }
      ],
    },
    {
      label: '下发参数',
      width: 160,
      children: [
        {
          key: 'controlParamsText',
          html: true,
          tooltip: true,
        }
      ],
    },
    // {
    //   label: '审核状态',
    //   width: 150,
    //   children: [
    //     {
    //       html: true,
    //       key: 'examineStatusHtml',
    //     }
    //   ],
    // },
    {
      label: '更新时间',
      width: 100,
      children: [
        {
          updatedDate: true
        }
      ],
    },
    {
      "label": "操作",
      "operation": true,
      "width": 220,
      "children": [
        {
          "button": true,
          type: tableOptBtnConfig.edit.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.protocol.type,
        },
        // {
        //   "button": true,
        //   type: tableOptBtnConfig.review.type,
        //   class: 'hover-success',
        // },
        {
          "button": true,
          type: tableOptBtnConfig.delete.type,
          class: 'hover-danger',
        }
      ]
    }
  ],
  "filters": [
    {
      "fieldType": "string",
      key: 'deviceType',
      label: '设备类别',
      "dataApi": API.deviceType.deviceTypeAll,
      "options": []
    },
    {
      "fieldType": "string",
      key: 'generalCommandType',
      label: '命令类型',
      options: commonConfig.commandType
    },
    {
      "fieldType": "input",
      key: 'methodName',
      label: '命令方法名',
    },
    {
      "fieldType": "input",
      key: 'methodAlias',
      label: '方法别名',
    },
    // {
    //   "fieldType": "input",
    //   key: 'remarks',
    //   label: '备注',
    // },
  ]
}
